<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="power by" content="http://www.whynto.com" />
    {{--<title>@yield('title')</title>--}}
    <title>公安内保综合业务信息管理平台</title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="stylesheet" type="text/css" href="{{ URL::asset('/') }}bootstrap/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="{{ URL::asset('/') }}css/style.css">
    <link rel="stylesheet" href="{{ URL::asset('/') }}font-awesome/css/font-awesome.css">
    <link rel="stylesheet" href="{{ URL::asset('/') }}css/jquery.treeview.css" />
    <link rel="stylesheet" type="text/css" href="{{ URL::asset('/') }}css/stylesheets/theme.css">
    <link rel="stylesheet" type="text/css" href="{{ URL::asset('/') }}css/stylesheets/premium.css">
    <link rel="stylesheet" type="text/css" href="{{ URL::asset('/') }}css/stylesheets/basic2.css"/>
    <link rel="stylesheet" type="text/css" href="{{ URL::asset('/') }}css/stylesheets/dw_table.css"/>
    <link rel="stylesheet" href="{{ URL::asset('/') }}css/default/easyui.css" type="text/css">
    <link rel="stylesheet" href="{{ URL::asset('/') }}css/icon.css" type="text/css">
    <script src="{{ URL::asset('/') }}js/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="{{ URL::asset('/') }}js/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="{{ URL::asset('/') }}js/easyui-lang-zh_CN.js"></script>
    <script src="{{ URL::asset('/') }}bootstrap/js/bootstrap.js"></script>
    <script src="{{ URL::asset('/') }}js/jquery.cookie.js"></script>
    <script src="{{ URL::asset('/') }}js/jquery.treeview.js"></script>
    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="{{ URL::asset('/') }}js/html5.js"></script>
    <script src="{{ URL::asset('/') }}js/respond.min.js"></script>
    <![endif]-->

    <!--[if lt IE 7 ]> <body class="ie ie6"> <![endif]-->
    <!--[if IE 7 ]> <body class="ie ie7 "> <![endif]-->
    <!--[if IE 8 ]> <body class="ie ie8 "> <![endif]-->
    <!--[if IE 9 ]> <body class="ie ie9 "> <![endif]-->
    <!--[if (gt IE 9)|!(IE)]><!-->

    <!--<![endif]-->
</head>
<body class=" theme-blue">
@section('sidebar')
    @include('head')
@show

{{--<div class="sidebar-nav">
    <ul>
        @foreach($area1 as $k=>$v)
        <li><a href="javascript:" data-target=".{{$v->name}}-menu" class="nav-header collapsed" data-toggle="collapse"><i class="fa fa-fw fa-sitemap"></i>{{$v->name}}<i class="fa fa-collapse"></i></a></li>
        <li>
            <ul class="{{$v->name}}-menu nav nav-list collapse">
                @foreach($area2 as $k=>$vv)
                    @if($vv->cid==$v->id)
                        <li><a href="{{url('admin/org/wuhan/武汉市/武昌区')}}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="fa fa-caret-right"></span>&nbsp;{{$vv->name}}</a></li>
                    @endif
                @endforeach
            </ul>
        </li>
        @endforeach
    </ul>
</div>--}}
<div class="easyui-layout" style="width:100%;height:765px;">
    @if(auth::user()->role_id != 22)
    <div data-options="region:'west',split:true" title="地区列表" style="width:192px;">
        <div id="treecontrol" class="treecontrol">
            <a title="" href="#">收缩</a>
            <a title="" href="#">展开</a>
        </div>
        <ul id="browser" class="filetree">
            @if(Auth::user()->dengji == '1')
                <li><span class="folder1"><a href="javascript:" onclick="load_city_data(0)">查看全省</a></span></li>
            @endif
            @foreach($area1 as $v)
            <li><span class="folder1"><a href="javascript:" @if(Auth::user()->dengji == '1' || Auth::user()->dengji == '2')onclick="load_city_data({{$v->id}})"@endif>{{$v->name}}</a></span>
                <ul>
                    @foreach($area2 as $v2)
                        @if($v2->cid==$v->id)
                            <li>
                                <span class="folder2"><a href="javascript:" @if(Auth::user()->dengji == '1' || Auth::user()->dengji == '2' || Auth::user()->dengji == '3')onclick="load_area_data({{$v2->id}})"@endif>{{$v2->name}}</a></span>
                                @foreach($area3 as $v3)
                                    @if($v3->cid==$v2->id)
                                        <ul>
                                            <li><a href="javascript:" onclick="load_org_data({{$v3->id}})"><span class="file">{{$v3->name}}</span></a></li>
                                        </ul>
                                    @endif
                                @endforeach
                            </li>
                        @endif
                    @endforeach
                </ul>
            </li>
            @endforeach
        </ul>
    </div>
    @endif

    <div data-options="region:'center',iconCls:'icon-ok'">
        @yield('content')
    </div>
</div>
<footer style="text-align: center">
    <hr>
    @if(auth::user()->role_id != 22)
        <p>Copyright ©2017 All Rights Reserved 公安内保综合信息管理平台 </p>
    @else
        <p>Copyright ©2017 All Rights Reserved 内保单位综合信息平台 </p>
    @endif

</footer>

<script>
    $(function(){

        $("#diqu").treeview();

        $("#browser").treeview({
            collapsed: true,
            control: "#treecontrol",
            persist: "location",
            cookieId: "filetree"
        });
    })
 

</script>

<script>
  // 左边菜单处理 城市
  function load_city_data($id){
    try{
      if(load_city_data_from_menu&&typeof(load_city_data_from_menu)=="function"){
        load_city_data_from_menu($id);
      }else{
        //alert("无数据");
      }
    }catch(e){
      //window.location.href = window.origin + "/admin/units/index?city=" + $id;
      window.location.href = window.origin + "/admin/index?id=" + $id;
    }
  }

  // 左边菜单处理 区域
  function load_area_data($id){
    try{
      if(load_area_data_from_menu&&typeof(load_area_data_from_menu)=="function"){
        load_area_data_from_menu($id);
      }else{
        //alert("首页11");
      }
    }catch(e){
      //window.location.href = window.origin + "/admin/units/index?area=" + $id;
      window.location.href = window.origin + "/admin/index?id=" + $id;
    }
  }

  // 左边菜单处理 下棋
  function load_org_data($id){
    try{
      if(load_org_data_from_menu&&typeof(load_org_data_from_menu)=="function"){
        load_org_data_from_menu($id);
      }else{
        //alert("首页111");
      }
    }catch(e){
      //window.location.href = window.origin + "/admin/units/index?org=" + $id;
      window.location.href = window.origin + "/admin/index?id=" + $id;
    }
  }

</script>

</body>
</html>
